#pragma once

#define MAX_BUFFER_SIZE 1024

// requests
#define REQ_CONNECTION_CLOSE 5
#define REQ_GET_TIME         6
#define REQ_GET_SERVER_NAME  7
#define REQ_GET_CLIENTS      8
#define REQ_SEND             9

// indication
#define INDICATION           20  // 指示类型数据包，由服务器主动发送

// responses
#define RES_GET_TIME         21
#define RES_GET_SERVER_NAME  22
#define RES_GET_CLIENTS      23
#define RES_SEND             24
#define RES_INVALID_REQ      25

// 自定义分隔符
#define EOT                  4  // End Of Transmission
#define ETX                  3  // End of one item (End Of Text)
#define EOT_STR              "\x04"
#define ETX_STR              "\x03"

// iostream color
#define RED "\033[31m"
#define GREEN "\033[32m"
#define YELLOW "\033[33m"
#define NORMAL "\033[0m"

// ftok() args
// ftok() 基于文件系统实现消息队列，PATh_NAME必须存在但无关紧要，ID必须统一
#define PATH_NAME            "/"
#define ID                   114

// WebServer
#define ROOT_PATH            "../root"